Integrand size = 29, antiderivative size = 113 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {3 B x}{8}+\frac {(5 A+4 C) \sin (c+d x)}{5 d}+\frac {3 B \cos (c+d x) \sin (c+d x)}{8 d}+\frac {B \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {C \cos ^4(c+d x) \sin (c+d x)}{5 d}-\frac {(5 A+4 C) \sin ^3(c+d x)}{15 d} \]
3/8*B*x+1/5*(5*A+4*C)*sin(d*x+c)/d+3/8*B*cos(d*x+c)*sin(d*x+c)/d+1/4*B*cos (d*x+c)^3*sin(d*x+c)/d+1/5*C*cos(d*x+c)^4*sin(d*x+c)/d-1/15*(5*A+4*C)*sin( d*x+c)^3/d
Time = 0.18 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.77 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {180 B c+180 B d x+60 (6 A+5 C) \sin (c+d x)+120 B \sin (2 (c+d x))+40 A \sin (3 (c+d x))+50 C \sin (3 (c+d x))+15 B \sin (4 (c+d x))+6 C \sin (5 (c+d x))}{480 d} \]
(180*B*c + 180*B*d*x + 60*(6*A + 5*C)*Sin[c + d*x] + 120*B*Sin[2*(c + d*x) ] + 40*A*Sin[3*(c + d*x)] + 50*C*Sin[3*(c + d*x)] + 15*B*Sin[4*(c + d*x)] + 6*C*Sin[5*(c + d*x)])/(480*d)
Time = 0.56 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.02, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.379, Rules used = {3042, 3502, 3042, 3227, 3042, 3113, 2009, 3115, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{5} \int \cos ^3(c+d x) (5 A+4 C+5 B \cos (c+d x))dx+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \int \sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (5 A+4 C+5 B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{5} \left ((5 A+4 C) \int \cos ^3(c+d x)dx+5 B \int \cos ^4(c+d x)dx\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left ((5 A+4 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx+5 B \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {1}{5} \left (5 B \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {(5 A+4 C) \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{5} \left (5 B \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {(5 A+4 C) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{5} \left (5 B \left (\frac {3}{4} \int \cos ^2(c+d x)dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {(5 A+4 C) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (5 B \left (\frac {3}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {(5 A+4 C) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{5} \left (5 B \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {(5 A+4 C) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{5} \left (5 B \left (\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )-\frac {(5 A+4 C) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {C \sin (c+d x) \cos ^4(c+d x)}{5 d}\) |
(C*Cos[c + d*x]^4*Sin[c + d*x])/(5*d) + (-(((5*A + 4*C)*(-Sin[c + d*x] + S in[c + d*x]^3/3))/d) + 5*B*((Cos[c + d*x]^3*Sin[c + d*x])/(4*d) + (3*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/4))/5
3.3.91.3.1 Defintions of rubi rules used
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 4.77 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.70
method | result | size |
parallelrisch | \(\frac {\left (40 A +50 C \right ) \sin \left (3 d x +3 c \right )+120 \sin \left (2 d x +2 c \right ) B +15 \sin \left (4 d x +4 c \right ) B +6 \sin \left (5 d x +5 c \right ) C +\left (360 A +300 C \right ) \sin \left (d x +c \right )+180 d x B}{480 d}\) | \(79\) |
derivativedivides | \(\frac {\frac {C \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(89\) |
default | \(\frac {\frac {C \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(89\) |
parts | \(\frac {A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {C \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}\) | \(94\) |
risch | \(\frac {3 x B}{8}+\frac {3 \sin \left (d x +c \right ) A}{4 d}+\frac {5 C \sin \left (d x +c \right )}{8 d}+\frac {C \sin \left (5 d x +5 c \right )}{80 d}+\frac {B \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) A}{12 d}+\frac {5 \sin \left (3 d x +3 c \right ) C}{48 d}+\frac {B \sin \left (2 d x +2 c \right )}{4 d}\) | \(105\) |
norman | \(\frac {\frac {3 x B}{8}+\frac {15 x B \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {15 x B \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {15 x B \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {15 x B \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {3 x B \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {4 \left (25 A +29 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {\left (8 A -5 B +8 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (8 A +5 B +8 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (32 A -3 B +16 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {\left (32 A +3 B +16 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(222\) |
1/480*((40*A+50*C)*sin(3*d*x+3*c)+120*sin(2*d*x+2*c)*B+15*sin(4*d*x+4*c)*B +6*sin(5*d*x+5*c)*C+(360*A+300*C)*sin(d*x+c)+180*d*x*B)/d
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.65 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {45 \, B d x + {\left (24 \, C \cos \left (d x + c\right )^{4} + 30 \, B \cos \left (d x + c\right )^{3} + 8 \, {\left (5 \, A + 4 \, C\right )} \cos \left (d x + c\right )^{2} + 45 \, B \cos \left (d x + c\right ) + 80 \, A + 64 \, C\right )} \sin \left (d x + c\right )}{120 \, d} \]
1/120*(45*B*d*x + (24*C*cos(d*x + c)^4 + 30*B*cos(d*x + c)^3 + 8*(5*A + 4* C)*cos(d*x + c)^2 + 45*B*cos(d*x + c) + 80*A + 64*C)*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (100) = 200\).
Time = 0.24 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.85 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\begin {cases} \frac {2 A \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 B x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 B x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 B x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 B \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 B \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {8 C \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 C \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {C \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (A + B \cos {\left (c \right )} + C \cos ^{2}{\left (c \right )}\right ) \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((2*A*sin(c + d*x)**3/(3*d) + A*sin(c + d*x)*cos(c + d*x)**2/d + 3*B*x*sin(c + d*x)**4/8 + 3*B*x*sin(c + d*x)**2*cos(c + d*x)**2/4 + 3*B*x* cos(c + d*x)**4/8 + 3*B*sin(c + d*x)**3*cos(c + d*x)/(8*d) + 5*B*sin(c + d *x)*cos(c + d*x)**3/(8*d) + 8*C*sin(c + d*x)**5/(15*d) + 4*C*sin(c + d*x)* *3*cos(c + d*x)**2/(3*d) + C*sin(c + d*x)*cos(c + d*x)**4/d, Ne(d, 0)), (x *(A + B*cos(c) + C*cos(c)**2)*cos(c)**3, True))
Time = 0.20 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.79 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A - 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B - 32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} C}{480 \, d} \]
-1/480*(160*(sin(d*x + c)^3 - 3*sin(d*x + c))*A - 15*(12*d*x + 12*c + sin( 4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B - 32*(3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*sin(d*x + c))*C)/d
Time = 0.30 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.79 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {3}{8} \, B x + \frac {C \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {B \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {{\left (4 \, A + 5 \, C\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {B \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (6 \, A + 5 \, C\right )} \sin \left (d x + c\right )}{8 \, d} \]
3/8*B*x + 1/80*C*sin(5*d*x + 5*c)/d + 1/32*B*sin(4*d*x + 4*c)/d + 1/48*(4* A + 5*C)*sin(3*d*x + 3*c)/d + 1/4*B*sin(2*d*x + 2*c)/d + 1/8*(6*A + 5*C)*s in(d*x + c)/d
Time = 1.32 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.92 \[ \int \cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {3\,B\,x}{8}+\frac {A\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {B\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {5\,C\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}+\frac {C\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {3\,A\,\sin \left (c+d\,x\right )}{4\,d}+\frac {5\,C\,\sin \left (c+d\,x\right )}{8\,d} \]